<template>
  <el-row>
    <el-col :span="24">
      <el-form :inline="true" :model="searchObj" class="search_prod tl">
        <el-form-item label>
          <el-input size="small" clearable v-model="searchObj.title" placeholder="商品关键词"></el-input>
        </el-form-item>
        <el-form-item>
          <el-row class="tl">
            <el-col :span="24">
              <el-button
                :loading="$store.state.isLoading"
                size="small"
                class="top_weiy"
                type="primary"
                @click="onSubmit"
              >查询</el-button>
              <el-button
                :loading="$store.state.isLoading"
                size="small"
                class="top_weiy"
                type="primary"
                @click="delSubmit"
              >一键清除</el-button>
            </el-col>
          </el-row>
        </el-form-item>
      </el-form>
    </el-col>
  </el-row>
</template>
<script>
export default {
  name: "ddksearch",
  data() {
    return {
      searchObj: {
        title: ""
      },
    };
  },
  methods: {
    delSubmit() {
      this.searchObj = {
        title: ""
      };
      this.$emit("sendSearch", this.searchObj);
    },
    onSubmit() {
      this.$emit("sendSearch", this.searchObj);
    }
  },
  created() {},
  watch: {}
};
</script>
